import Vue from "vue";
import Router from "vue-router";
import HelloWorld from "@/pages/HelloWorld";
import Index from "@/pages/index";
import home from "@/components/component1/home";
import page01 from "@/components/component1/page01";
import page02 from "@/components/component1/page02";
import page01A from "@/components/component1/page01/page01-A";
import page01B from "@/components/component1/page01/page01-b";
import pageEnd from "@/components/component1/page01/B/end";
import map from "@/pages/map/map";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "hello",
      component: HelloWorld
    },
    {
      path: "/hello",
      name: "hello",
      component: HelloWorld
    },
    {
      path: "/index",
      name: "index",
      component: Index,
      children: [
        {
          path: "/home",
          name: "home",
          component: home
        },
        {
          path: "/page01",
          name: "page01",
          component: page01,
          children: [
            {
              path: "page01-a",
              name: "page01A",
              component: page01A
            },
            {
              path: "page01-b",
              name: "page01B",
              component: page01B,
              children: [
                {
                  path: "end",
                  name: "pageEnd",
                  component: pageEnd
                }
              ]
            }
          ]
        },
        {
          path: "/page02",
          name: "page02",
          component: page02
        },
        {
          path: "/map",
          name: "map",
          component: map
        }
      ]
    }
  ]
});
